import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/home'
import err from '@/components/user/error'
import addr from '@/components/public/addr'
//引入一个组件模块
import childern from '@/components/public/childern'
//引入子路由
import user from './user.js'
import homeheader from './homeheader.js'
import lideta from './lideta.js'
import percent from './percent.js'
Vue.use(Router)

export default new Router({
	routes: [{
			path: '/',
			name: 'home',
			component: home
		},
		{
				path: '/addr',
				name: 'addr',
				component: addr
			},
		{
			path: '/user',
			name: 'user',
			component: childern,
			children: user
		},
		{
			path: '/lideta',
			name: 'lideta',
			component: childern,
			children: lideta
		},
		{
			path: '*',
			name: 'error',
			component: err
		},
		{
			path: '/percent',
			name: 'percent',
			component: childern,
			children: percent
		}
	]
})
